	.file	"echoservert.c"
	.section	.rodata
.LC0:
	.string	"usage: %s <port>\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$80, %rsp
	movl	%edi, -68(%rbp)
	movq	%rsi, -80(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$16, -60(%rbp)
	cmpl	$2, -68(%rbp)
	je	.L2
	movq	-80(%rbp), %rax
	movq	(%rax), %rdx
	movq	stderr(%rip), %rax
	movl	$.LC0, %esi
	movq	%rax, %rdi
	movl	$0, %eax
	call	fprintf
	movl	$0, %edi
	call	exit
.L2:
	movq	-80(%rbp), %rax
	addq	$8, %rax
	movq	(%rax), %rax
	movq	%rax, %rdi
	call	atoi
	movl	%eax, -56(%rbp)
	movl	-56(%rbp), %eax
	movl	%eax, %edi
	call	Open_listenfd
	movl	%eax, -52(%rbp)
.L3:
	movl	$4, %edi
	call	Malloc
	movq	%rax, -40(%rbp)
	leaq	-60(%rbp), %rdx
	leaq	-32(%rbp), %rcx
	movl	-52(%rbp), %eax
	movq	%rcx, %rsi
	movl	%eax, %edi
	call	Accept
	movl	%eax, %edx
	movq	-40(%rbp), %rax
	movl	%edx, (%rax)
	movq	-40(%rbp), %rdx
	leaq	-48(%rbp), %rax
	movq	%rdx, %rcx
	movl	$thread, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	Pthread_create
	jmp	.L3
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.globl	thread
	.type	thread, @function
thread:
.LFB3:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movq	-24(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	call	pthread_self
	movq	%rax, %rdi
	call	Pthread_detach
	movq	-24(%rbp), %rax
	movq	%rax, %rdi
	call	Free
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	echo
	movl	-4(%rbp), %eax
	movl	%eax, %edi
	call	Close
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	thread, .-thread
	.section	.rodata
.LC1:
	.string	"server received %d bytes\n"
	.text
	.globl	echo
	.type	echo, @function
echo:
.LFB4:
	.cfi_startproc
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16448, %rsp
	movl	%edi, -16436(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	-16436(%rbp), %edx
	leaq	-16416(%rbp), %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	Rio_readinitb
	jmp	.L8
.L9:
	movl	-16420(%rbp), %eax
	movl	%eax, %esi
	movl	$.LC1, %edi
	movl	$0, %eax
	call	printf
	movl	-16420(%rbp), %eax
	movslq	%eax, %rdx
	leaq	-8208(%rbp), %rcx
	movl	-16436(%rbp), %eax
	movq	%rcx, %rsi
	movl	%eax, %edi
	call	Rio_writen
.L8:
	leaq	-8208(%rbp), %rcx
	leaq	-16416(%rbp), %rax
	movl	$8192, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	Rio_readlineb
	movl	%eax, -16420(%rbp)
	cmpl	$0, -16420(%rbp)
	jne	.L9
	nop
	movq	-8(%rbp), %rax
	xorq	%fs:40, %rax
	je	.L10
	call	__stack_chk_fail
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	echo, .-echo
	.ident	"GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609"
	.section	.note.GNU-stack,"",@progbits
